CREATE TABLE `SRAnalytics`.`MsgOptionCloseMark` (
`okey_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None',
`okey_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None',
`okey_tk` VARCHAR(12) NOT NULL DEFAULT '',
`okey_yr` SMALLINT UNSIGNED NOT NULL DEFAULT 0,
`okey_mn` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`okey_dy` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`okey_xx` DOUBLE NOT NULL DEFAULT 0,
`okey_cp` ENUM('Call','Put','Pair') NOT NULL DEFAULT 'Call',
`ticker_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None' COMMENT 'SR Ticker that this option rolls up to',
`ticker_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None' COMMENT 'SR Ticker that this option rolls up to',
`ticker_tk` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'SR Ticker that this option rolls up to',
`tradeDate` DATE NOT NULL DEFAULT '1900-01-01',
`clsMarkState` ENUM('None','Preview','Final') NOT NULL DEFAULT 'None' COMMENT 'Preview or Final',
`uBid` DOUBLE NOT NULL DEFAULT 0 COMMENT 'SpiderRock closing underlier bid (C - 5m)',
`uAsk` DOUBLE NOT NULL DEFAULT 0 COMMENT 'SpiderRock closing underlier ask (C - 5m)',
`uSrCls` DOUBLE NOT NULL DEFAULT 0 COMMENT 'SpiderRock underlier closing mark (C - 5m)',
`uClose` DOUBLE NOT NULL DEFAULT 0 COMMENT 'exchange underlier closing mark',
`bidPrc` FLOAT NOT NULL DEFAULT 0 COMMENT 'SpiderRock closing option bid (C - 5m)',
`askPrc` FLOAT NOT NULL DEFAULT 0 COMMENT 'SpiderRock closing option ask (C - 5m)',
`srClsPrc` DOUBLE NOT NULL DEFAULT 0 COMMENT 'SpiderRock close mark (close - 5min) [NBBO mid-market]',
`closePrc` DOUBLE NOT NULL DEFAULT 0 COMMENT 'official exchange closing mark (last print;then official close)',
`hasSRClsPrc` ENUM('None','Yes','No') NOT NULL DEFAULT 'None',
`hasClosePrc` ENUM('None','Yes','No') NOT NULL DEFAULT 'None',
`hasUClsPrc` ENUM('None','Yes','No') NOT NULL DEFAULT 'None',
`bidIV` FLOAT NOT NULL DEFAULT 0 COMMENT 'implied vol of SpiderRock closing bid price (C - 5m)',
`askIV` FLOAT NOT NULL DEFAULT 0 COMMENT 'implied vol of SpiderRock closing ask price (C - 5m)',
`srPrc` FLOAT NOT NULL DEFAULT 0 COMMENT 'sr close mark price (always within bidPx/askPx) (C - 5m)',
`srVol` FLOAT NOT NULL DEFAULT 0 COMMENT 'sr close mark volatility (C - 5m)',
`srSrc` ENUM('None','NbboMid','SRVol','LoBound','HiBound','Other') NOT NULL DEFAULT 'None' COMMENT 'sr close mark source (SRVol is SurfaceVol)',
`de` FLOAT NOT NULL DEFAULT 0 COMMENT 'delta',
`ga` FLOAT NOT NULL DEFAULT 0 COMMENT 'gamma',
`th` FLOAT NOT NULL DEFAULT 0 COMMENT 'theta',
`ve` FLOAT NOT NULL DEFAULT 0 COMMENT 'vega',
`vo` FLOAT NOT NULL DEFAULT 0 COMMENT 'volga',
`va` FLOAT NOT NULL DEFAULT 0 COMMENT 'vanna',
`rh` FLOAT NOT NULL DEFAULT 0 COMMENT 'rho',
`ph` FLOAT NOT NULL DEFAULT 0 COMMENT 'phi',
`srSlope` FLOAT NOT NULL DEFAULT 0 COMMENT 'surface slope (SR surface)',
`deDecay` FLOAT NOT NULL DEFAULT 0 COMMENT 'delta decay',
`sdiv` FLOAT NOT NULL DEFAULT 0 COMMENT 'sdiv rate',
`ddiv` FLOAT NOT NULL DEFAULT 0 COMMENT 'ddiv amount (sum of discrete dividend amounts)',
`ddivPv` FLOAT NOT NULL DEFAULT 0 COMMENT 'ddiv (present value) amount (sum of discrete dividend pv amounts)',
`rate` FLOAT NOT NULL DEFAULT 0 COMMENT 'discount rate',
`iDays` INT NOT NULL DEFAULT 0 COMMENT 'interest days (today to expiry) (T+1)',
`years` FLOAT NOT NULL DEFAULT 0 COMMENT 'years to expiration',
`error` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'calculation error code',
`openInterest` INT NOT NULL DEFAULT 0 COMMENT 'option open Interest',
`prtCount` INT NOT NULL DEFAULT 0 COMMENT 'print count',
`prtVolume` INT NOT NULL DEFAULT 0 COMMENT 'total printed volume (all prt types)',
`srCloseMarkDttm` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'from MarketCloseQuote.srCloseMarkDttm (in trading period local timezone)',
`configNow` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'timestamp in the trading period local timezone',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'record timestamp',
PRIMARY KEY USING HASH (`okey_tk`,`okey_yr`,`okey_mn`,`okey_dy`,`okey_xx`,`okey_cp`,`okey_at`,`okey_ts`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='OptionCloseMark records are published immediately after the market close - 5 min and again when exchanges publish official marks.\nOptionCloseMark records are published to the SpiderRock elastic cluster when clsMarkState=Final';